package com.bw.module_home.adapter

import android.widget.ImageView
import com.bumptech.glide.Glide
import com.bw.module_home.R
import com.bw.module_home.model.HomeCateEntity
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

class HomeCateAdapter:BaseQuickAdapter<HomeCateEntity,BaseViewHolder>(R.layout.item_home_cate) {
    override fun convert(holder: BaseViewHolder, item: HomeCateEntity) {
        holder.setText(R.id.home_cate_tv,item.title)
        val img = holder.getView<ImageView>(R.id.home_cate_img)
        Glide.with(img).load(item.img).into(img)
    }
}